package jianzhiOffer;
//剑指 Offer 27. 二叉树的镜像
public class Num27_mirrorTree {
    public TreeNode mirrorTree(TreeNode root) {
        if (root == null || (root.left == null && root.right == null))return root;
        TreeNode left = mirrorTree(root.left);
        TreeNode right = mirrorTree(root.right);
        root.left = right;
        root.right = left;
        return root;
    }
}
